<?php
/**
 * Created by PhpStorm.
 * User: peter
 * Date: 18-9-27
 * Time: 上午10:54
 */

namespace app\model;

use think\model\concern\SoftDelete;
use think\Model;

class ActivityCollectionPoint extends Base
{
    protected $pk = 'id';
    // 此处表名请务必设置为public
    public $table = 'activity_collection_point';
    protected $autoWriteTimestamp = true; //自动时间戳
    protected $createTime   = 'create_at';
    protected $updateTime   = 'update_at';
    // 软删除
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    /**
     * @purpose 绑定订单模型表
     * @return \think\model\relation\HasMany
     */
    public function orderAttach () {
        return $this->hasMany('ActivityOrderAttach', 'collection_point_id', 'id');
    }
}